package com.songlanyun.modules.hxcategory.controller.api;

import com.songlanyun.common.utils.R;
import com.songlanyun.modules.account.controller.common.AbstractApiController;
import com.songlanyun.modules.hxcategory.entity.HxCategoryEntity;
import com.songlanyun.modules.hxcategory.service.HxCategoryEntityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;


/**
 * 平台的商品分类表的控制层 api
 *
 * @author lubo
 * @email sunlightcs@gmail.com
 * @date 2020-11-02 15:58:00
 */
@RestController
@RequestMapping("api/hxcategory")
public class HxCategoryApiController extends AbstractApiController {
    @Autowired
    private HxCategoryEntityService hxCategoryEntityService;



    /**
     * 惠选分类
     */
    @RequestMapping("/home/recommend/{limit}")
    public R homeRecommend(@PathVariable("limit") Integer limit) {
        List<HxCategoryEntity> list = hxCategoryEntityService.homeRecommend(limit);
        return R.ok().put("list", list);
    }
}

